
	Using Yak from NS BASIC


	To call Yak from within NS BASIC, simply add these lines to the beginning of your program:

	 	5 LET yakptr := getroot().|yak:JSACC|
		10 function setup() u.yakptr:open();
		15 function speak(stuff) u.yakptr:dosentence(stuff);
		20 function shutdown() u.yakptr:close()
		25 U:setup();

	now you can call the function speak with a string parameter:

		30 U:speak("this is a test")


	be sure to include the following statement at the end of your program to clean up:

		35 U:shutdown()


  and that's it!


		The other function which may be of some interest (and is further explained in the Newtonscript file) is speakarray().  If you need to use this function, then something like this will work:

	function arraytalk(myarray) u.yakptr:speakarray(myarray);

	then to say "hello" ...

 	U:arraytalk([7,4,11,35,99])

	You probably won't need to use speakarray.

